package cn.ad.enumration;

/***
 * AdView审核状态 枚举类
 * 
 * @author yujuan.zhang
 * @from 2016-08-01
 * @since DSP V1.1
 *
 */
public enum AdViewAuditStatus {
	PENDING(1, AuditStatus.INPROGRESS, "未审核"), 
	SUCCESS(2, AuditStatus.SUCCESS, "审核通过"), 
	FAILURE(3, AuditStatus.FAILURE,	"审核未通过");

	private int value;
	private String description;
	private AuditStatus auditStatus;

	private static java.util.HashMap<Integer, AuditStatus> mappings;

	private synchronized static java.util.HashMap<Integer, AuditStatus> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, AuditStatus>();
		}
		return mappings;
	}

	private AdViewAuditStatus(int value, AuditStatus auditStatus, String description) {
		this.value = value;
		this.auditStatus = auditStatus;
		this.description = description;
		AdViewAuditStatus.getMappings().put(value, auditStatus);
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public AuditStatus getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(AuditStatus auditStatus) {
		this.auditStatus = auditStatus;
	}
	
    public static AuditStatus forValue(int value) {
        return getMappings().get(value);
    }

}
